package com.chatplus.application.domain.response;

import com.chatplus.application.domain.dto.UserCustomChatConfigDto;
import com.chatplus.application.json.Int64AsString;
import com.chatplus.application.json.PhoneJsonSerializer;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;

@JsonIgnoreProperties(ignoreUnknown = true)
public class AccountProfileResponse implements Serializable {


    /**
     * id : 101
     * mobile : 15302789406
     * avatar : /images/avatar/user.png
     * chat_config : {"api_keys":{"Azure":"","ChatGLM":"","OpenAI":""}}
     * calls : 9973
     * img_calls : 12
     * total_tokens : 33221
     * tokens : 0
     * expired_time : 1706025158
     * vip : false
     */

    @JsonProperty("id")
    @JsonSerialize(using = Int64AsString.class)
    private Long id;
    @JsonProperty("nickname")
    private String nickname;
    @JsonProperty("username")
    @JsonSerialize(using = PhoneJsonSerializer.class)
    private String username;
    @JsonProperty("avatar")
    private String avatar;
    @JsonProperty("chat_config")
    private UserCustomChatConfigDto chatConfig;
    @JsonProperty("calls")
    private int calls;
    @JsonProperty("img_calls")
    private int imgCalls;
    @JsonProperty("total_tokens")
    private int totalTokens;
    @JsonProperty("tokens")
    private int tokens;
    @JsonProperty("expired_time")
    private int expiredTime;
    @JsonProperty("vip")
    private boolean vip;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public UserCustomChatConfigDto getChatConfig() {
        return chatConfig;
    }

    public void setChatConfig(UserCustomChatConfigDto chatConfig) {
        this.chatConfig = chatConfig;
    }

    public int getCalls() {
        return calls;
    }

    public void setCalls(int calls) {
        this.calls = calls;
    }

    public int getImgCalls() {
        return imgCalls;
    }

    public void setImgCalls(int imgCalls) {
        this.imgCalls = imgCalls;
    }

    public int getTotalTokens() {
        return totalTokens;
    }

    public void setTotalTokens(int totalTokens) {
        this.totalTokens = totalTokens;
    }

    public int getTokens() {
        return tokens;
    }

    public void setTokens(int tokens) {
        this.tokens = tokens;
    }

    public int getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(int expiredTime) {
        this.expiredTime = expiredTime;
    }

    public boolean isVip() {
        return vip;
    }

    public void setVip(boolean vip) {
        this.vip = vip;
    }
}
